package com.warrior.superdata.mysql.entity.dto;

import com.warrior.superdata.base.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Description:
 * @ClassName: com.warrior.wisdom.machine.room.mysql.entity.dto.ApiParamDto.java
 * @date: 2022/2/23 10:39
 * @author xujian
 */
@Data
public class ApiParamDto extends BaseDto {

    @ApiModelProperty(value = "接口id")
    private Integer apiId;

    @NotBlank(message = "参数名称不能为空")
    @ApiModelProperty(value = "参数名称")
    private String paramName;

    //@NotBlank(message = "参数类型不能为空")
    @ApiModelProperty(value = "参数类型")
    private String paramJavaType;

    @NotBlank(message = "对应表字段类型不能为空")
    @ApiModelProperty(value = "对应表字段类型")
    private String paramTableFieldType;

    @NotBlank(message = "对应表字段不能为空")
    @ApiModelProperty(value = "对应表字段")
    private String paramTableFieldName;

    @NotNull(message = "请求类型不能为空")
    @ApiModelProperty(value = "请求类型 0:url传参 1:请求体传参")
    private Integer paramBodyType;

    @NotNull(message = "是否必须要的参数不能为空")
    @ApiModelProperty(value = "是否必须要的参数 1:是 0:否")
    private Integer isRequired;

    @ApiModelProperty(value = "请求参数对应的值")
    private Object paramValue;

    @NotNull(message = "条件类型不能为空")
    @ApiModelProperty(value = "条件类型 1:等于 2:小于 3:小于等于 4:大于 5:大于等于 6:模糊")
    private Integer conditionType;

    @NotNull(message = "是否更新参数不能为空")
    @ApiModelProperty(value = "是否更新参数 1：是 0：否")
    private Integer isUpdate;

}
